package com.wkbb.common.enums;

public enum OnlineTypeEnum {
    /**
     * 1.线上
     */
    ONLINE(1,"ONLINE"),
    /**
     * 2.线下
     */
    OFFLINE(2,"OFFLINE");



    private OnlineTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (OnlineTypeEnum onlineType : OnlineTypeEnum.values()) {
            if (onlineType.getValue().intValue()==value) {
                return onlineType.getDesc();
            }
        }
        return null;
    }
}
